home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / remote / bat2fd10.zip / RA2.BAT < prev    next >
DOS Batch File  |  1990-11-03  |  2KB  |  89 lines

  1.  
  2. Rem 
  3. Rem Main batchfile for line 2
  4. Rem
  5.  
  6. @Echo Off
  7. \Dv\Dvansi
  8. If Exist C:\Ra\Line2\Down Del C:\Ra\Line2\Down
  9. Cls
  10.  
  11. Rem ----------------------------------------
  12. Rem - Set environment variables for Node 2 -
  13. Rem ----------------------------------------
  14. Set DSZPORT=2
  15. Set TCNODE=2
  16. Set FD=C:\FD\FD2
  17. Set FDOPT=NOMDM
  18.  
  19. Rem - Main -----------------------------------------------------------------
  20. :Start
  21.  
  22. Rem -------------------------------------------
  23. Rem - Before starting FD we can check whether -
  24. Rem - Node 1 wants to do something            -
  25. Rem -------------------------------------------
  26. If Exist C:\Ra\Line2\GoDown Goto WaitFor1
  27. If Exist C:\Fd\Fd2\FdExit.160 Del C:\Fd\Fd2\FdExit.160
  28. If Exist C:\Fd\Fd2\FdExit.170 Goto Do_Mail
  29.  
  30. C:
  31. Cd\Ra\Line2
  32. Bnuhlp /C
  33.  
  34. Ra -N2 -C2 -E250 -M*H*MC:\FD\FD.Exe
  35. If ErrorLevel 250 Goto AfterRA
  36. If ErrorLevel 170 Goto Do_Mail
  37. If ErrorLevel 160 Goto WaitFor1
  38. If ErrorLevel 100 Goto Mail_In
  39. If ErrorLevel   6 Goto End
  40. If ErrorLevel   3 Goto BBS_Mail
  41. Goto End
  42.  
  43. Rem ------- Exit after human caller; user entered mail----------------------
  44. :BBS_Mail
  45. Rem ------------------------------------------
  46. Rem - Signal that mail needs to be processed -
  47. Rem ------------------------------------------
  48. Rem > C:\Ra\Line2\Mail!
  49.  
  50. Rem - X250- Exit after human caller-----------------------------------------
  51. :AfterRA
  52. Cd\Ra\Line2
  53. If Exist C:\Ra\Line2\Mail! Goto Do_Mail
  54. Goto Start
  55.  
  56. Rem - X170- Mail should be processed----------------------------------------
  57. :Do_Mail
  58. If Exist C:\Fd\Fd2\FdExit.170 Del C:\Fd\Fd2\FdExit.170
  59.  
  60. Rem -----------------------------------
  61. Rem - Signal that Node 2 is available -
  62. Rem -----------------------------------
  63. Rem > C:\Fd\FdExit.100
  64. Goto Start
  65.  
  66. Rem - X160- Stop windowactivity---------------------------------------------
  67. :WaitFor1
  68.  
  69. Rem ------------------------------------------------------------
  70. Rem - Both nodes are now available and Node 1 tells us to wait -
  71. Rem ------------------------------------------------------------
  72. Rem > C:\Ra\Line2\Down
  73. If Exist C:\Ra\Line2\GoDown Del C:\Ra\Line2\GoDown
  74. Echo Node 2 is Down
  75. :Waiting
  76. DvComand Wait 300
  77. If Exist C:\Ra\Line2\Down Goto Waiting
  78. Goto Start
  79.  
  80. Rem - X100- Mail received - Let Node 1 process it---------------------------
  81. :Mail_In
  82. Rem > C:\Fd\FdExit.100
  83. Rem > C:\Ra\Line2\Mail!
  84. Goto Start
  85.  
  86. Rem - Exit batchfile--------------------------------------------------------
  87. :End
  88.  
  89.